﻿component accessors="true" extends="controllerbase" {
	property resource;
	this.entityObj = "resource";
	
	public void function getFlatTree(rc){
		rc.json = variables.resource.getFlatTree();
		variables.fw.renderData('json', rc.json);
	}
	
	//获取组织
	public void function getOrgGrantTree(rc){
		rc.json = variables.resource.getOrgGrantTree(rc.id);
		variables.fw.renderData('json', rc.json);
	}
	
	//获取角色
	public void function getRoleGrantTree(rc){
		rc.json = variables.resource.getRoleGrantTree(rc.id);
		variables.fw.renderData('json', rc.json);
	}
	
	public void function list(rc){
		rc.json = variables.resource.list();
		variables.fw.renderData('json', rc.json);
	}
	
	//获取资源类别
	public void function getResourcetype(rc){
		rc.json = variables.resource.getResourcetype();
		variables.fw.renderData('json', rc.json);
	}
}